// File:    LancamentoCancelado.cs
// Author:  Lucas Bittencourt
// Created: segunda-feira, 7 de novembro de 2011 20:48:44
// Purpose: Definition of Class LancamentoCancelado

using System;
using System.Text;

namespace DA_OOMModel
{
   public class LancamentoCancelado
   {
       private int lccIdLancamento;
       private DateTime lccDtLancamento;
       private DateTime lccDtRegistro;
       private decimal lccVlLancamento;
       private string lccTpLancamento;
       private string lccTpCreditoDebito;
       private DateTime lccDtCancelamento;

       private ContaBancaria contaBancaria;
      
      /// <summary>
      /// Property for ContaBancaria
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual ContaBancaria ContaBancaria
      {
         get
         {
            return contaBancaria;
         }
         set
         {
               this.contaBancaria = value;
         }
      }
      private Usuario usuarioCancelamento;
      
      /// <summary>
      /// Property for Usuario
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual Usuario UsuarioCancelamento
      {
         get
         {
            return usuarioCancelamento;
         }
         set
         {
               this.usuarioCancelamento = value;
         }
      }
      private Usuario usuarioQueRegistro;
      
      /// <summary>
      /// Property for Usuario
      /// </summary>
      /// <pdGenerated>Default opposite class property</pdGenerated>
      public virtual Usuario UsuarioQueRegistro
      {
         get
         {
            return usuarioQueRegistro;
         }
         set
         {
               this.usuarioQueRegistro = value;
         }
      }
   
      /// <summary>
      /// Get value of property LccIdLancamento.
      /// </summary>
      public virtual int LccIdLancamento
      {
         get
         {
            return lccIdLancamento;
         }
         set
         {
            if (this.lccIdLancamento != value)
               this.lccIdLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LccDtLancamento.
      /// </summary>
      public virtual DateTime LccDtLancamento
      {
         get
         {
            return lccDtLancamento;
         }
         set
         {
            if (this.lccDtLancamento != value)
               this.lccDtLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LccDtRegistro.
      /// </summary>
      public virtual DateTime LccDtRegistro
      {
         get
         {
            return lccDtRegistro;
         }
         set
         {
            if (this.lccDtRegistro != value)
               this.lccDtRegistro = value;
         }
      }
      
      /// <summary>
      /// Get value of property LccVlLancamento.
      /// </summary>
      public virtual decimal LccVlLancamento
      {
         get
         {
            return lccVlLancamento;
         }
         set
         {
            if (this.lccVlLancamento != value)
               this.lccVlLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LccTpLancamento.
      /// </summary>
      public virtual string LccTpLancamento
      {
         get
         {
            return lccTpLancamento;
         }
         set
         {
            if (this.lccTpLancamento != value)
               this.lccTpLancamento = value;
         }
      }
      
      /// <summary>
      /// Get value of property LccTpCreditoDebito.
      /// </summary>
      public virtual string LccTpCreditoDebito
      {
         get
         {
            return lccTpCreditoDebito;
         }
         set
         {
            if (this.lccTpCreditoDebito != value)
               this.lccTpCreditoDebito = value;
         }
      }
      
      /// <summary>
      /// Get value of property LccDtCancelamento.
      /// </summary>
      public virtual DateTime LccDtCancelamento
      {
         get
         {
            return lccDtCancelamento;
         }
         set
         {
            if (this.lccDtCancelamento != value)
               this.lccDtCancelamento = value;
         }
      }
   
      /// <summary>
      /// Get and set primary key class
      /// </summary>
      public virtual LancamentoCanceladoPK LancamentoCanceladoPK
      {
         get 
         {
            return new LancamentoCanceladoPK(lccIdLancamento);
         }
         set
         {
            if (value != null)
            {
               this.lccIdLancamento = value.LccIdLancamento;
            }
         }
      }
   
      /// <summary>
      /// Get hash code
      /// </summary>
      /// <pdGenerated>Get hash code</pdGenerated>
      public override int GetHashCode()
      {
         int _hashCode = 0;
         _hashCode = 29 * LancamentoCanceladoPK.GetHashCode();
         _hashCode += 29 * lccDtLancamento.GetHashCode();
      
         _hashCode += 29 * lccDtRegistro.GetHashCode();
      
         _hashCode += 29 * lccVlLancamento.GetHashCode();
      
         if (this.lccTpLancamento != null) 
            _hashCode += 29 * lccTpLancamento.GetHashCode();
      
         if (this.lccTpCreditoDebito != null) 
            _hashCode += 29 * lccTpCreditoDebito.GetHashCode();
      
         _hashCode += 29 * lccDtCancelamento.GetHashCode();
         return _hashCode;
      }
   
      /// <summary>
      /// Test if two objects are equal
      /// </summary>
      /// <param name="object">Object to compare</param>
      /// <pdGenerated>Test if two objects are equal</pdGenerated>
      public override bool Equals(object obj)
      {
         if (obj == null)
            return false;
         LancamentoCancelado cast = obj as LancamentoCancelado;
         if (!(obj is LancamentoCancelado))
            return false;
         if (!this.LancamentoCanceladoPK.Equals(cast.LancamentoCanceladoPK))
            return false;
         if (this.lccIdLancamento != cast.LccIdLancamento)
            return false;
         if (this.lccDtLancamento != cast.LccDtLancamento)
            return false;
         if (this.lccDtRegistro != cast.LccDtRegistro)
            return false;
         if (this.lccVlLancamento != cast.LccVlLancamento)
            return false;
         if (String.Equals(this.lccTpLancamento, cast.LccTpLancamento) == false)
            return false;
      
         if (String.Equals(this.lccTpCreditoDebito, cast.LccTpCreditoDebito) == false)
            return false;
      
         if (this.lccDtCancelamento != cast.LccDtCancelamento)
            return false;
      
         return true;
      }
   
      /// <summary>
      /// Get object in string format
      /// </summary>
      /// <pdGenerated>Get object in string format</pdGenerated>
      public override string ToString()
      {
         StringBuilder ret = new StringBuilder();
         ret.Append( "LancamentoCancelado: " );
         ret.Append( "LccIdLancamento='" + lccIdLancamento.ToString() + "'");
         ret.Append( "LccDtLancamento='" + lccDtLancamento.ToString() + "'");
         ret.Append( "LccDtRegistro='" + lccDtRegistro.ToString() + "'");
         ret.Append( "LccVlLancamento='" + lccVlLancamento.ToString() + "'");
         if (lccTpLancamento != null)
            ret.Append( "LccTpLancamento='" + lccTpLancamento.ToString() + "'");
         if (lccTpCreditoDebito != null)
            ret.Append( "LccTpCreditoDebito='" + lccTpCreditoDebito.ToString() + "'");
         ret.Append( "LccDtCancelamento='" + lccDtCancelamento.ToString() + "'");
         return ret.ToString();
      }
   
   }
}